#pragma comment(linker, "/STACK:10000000")
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#include <cassert>
#include <string>
#include <cstring>
#define ldb long double
#define LL long long
#define fi first
#define se second
#define fill(a, c) memset(a, c, sizeof(a))
#define sqr(a) ((a) * (a))
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define getBit(mask, k) (((mask) / pw[k]) % pw[1])
#define setBit(mask, k, l) (((mask) / pw[k + 1] * pw[1] + (l)) * pw[k] + ((mask) % pw[k]))
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
const ldb LDINF = 9128739847123.00;
const ldb eps = 1e-9;
const int INF = 1 << 30;
const ldb pi = fabsl(atan2(0.0, -1.0));
using namespace std;

int np;
int n, m, k;
string s;


void Load()
{
	cin >> n >> m >> k;
	cin >> s;
	cin >> s;
	m--, k--;
	np = 1;
	if (s == "head") np = -1;
	cin >> s;
}

int st = 0;
int dp[52][52];

int place(int i)
{
	int r = np;
	int c = k;
	for (int l = 0; l < i; l++)
	{
		c += r;
		if (c >= n || c < 0)
		{
			r *= -1;
			c += 2 * r;
		}	
	}	
	return c;
}

int f(int i, int j)
{	
	st = max(st, i);
	//cerr << i << " " << j << " " << place(i) << "\n";
	if (i == s.size()) return 1;
	if (j == place(i)) return 0;
	if (dp[i][j] != -1) return dp[i][j];
	dp[i][j] = 0;
	//cerr << "tep " << i << " " << j << " " << place(i) << "\n";
	int l;
	
	if (s[i] == '0')
	{
		for (l = -1; l <= 1; l++)
		{
			if (j + l >= 0 && j + l < n)
			{
				if (j + l != place(i) && f(i + 1, j + l))
				{
					dp[i][j] = 1;
					return 1;
				}
			}
		}
	}
	else if (s[i] == '1')
	{
		for (l = 0; l < n; l++)
		{
			if (f(i + 1, l))
			{
				dp[i][j] = 1;
				return 1;
			}
			
		}
	}
	return 0;
}

void Solve()
{
	memset(dp, -1, sizeof dp);
	if (f(0, m))
	{
		cout << "Stowaway";
	}
	else 
	{
		cout << "Controller " << st;
	}
	

}

#define file "b"
int main()
{
	#ifndef ONLINE_JUDGE
		freopen(file".in", "rt", stdin);
		freopen(file".out", "wt", stdout);
	#endif
	Load();
	Solve();
	return 0;
}
